package com.tjetc.service.impl;

import com.tjetc.vo.Result;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.tjetc.mapper.HospitalLevelMapper;
import com.tjetc.domain.HospitalLevel;
import com.tjetc.service.HospitalLevelService;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Service
public class HospitalLevelServiceImpl implements HospitalLevelService{

    @Resource
    private HospitalLevelMapper hospitalLevelMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return hospitalLevelMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(HospitalLevel record) {
        return hospitalLevelMapper.insert(record);
    }

    @Override
    public int insertSelective(HospitalLevel record) {
        return hospitalLevelMapper.insertSelective(record);
    }

    @Override
    public HospitalLevel selectByPrimaryKey(Integer id) {
        return hospitalLevelMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(HospitalLevel record) {
        return hospitalLevelMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(HospitalLevel record) {
        return hospitalLevelMapper.updateByPrimaryKey(record);
    }

    @Override
    public Result selectAll() {
        List<HospitalLevel> hospitalLevels = hospitalLevelMapper.selectAll();
        return Result.ok(hospitalLevels);
    }

}
